package com.example.demo;

import com.example.demo.Component.UserComponent;
import com.example.demo.Component.UserInfoController;
import com.example.demo.Controller.PropertiseController;
import com.example.demo.Controller.UserController;
import com.example.demo.Model.UserInfo;
import com.example.demo.Repository.UserRepository;
import com.example.demo.Services.ServiceController;
import lombok.val;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Service;

@SpringBootApplication
public class SpingIocApplication {

	public static void main(String[] args) {
	ApplicationContext context = SpringApplication.run(SpingIocApplication.class, args);
//		UserComponent bean = context.getBean(UserComponent.class);
//		bean.say();
//		UserController userController=context.getBean(UserController.class);
//		userController.say();
//		Object userInfo2 = context.getBean("userInfo2");
//		System.out.println(userInfo2);
//		bean.say();
//		ServiceController bean1 = context.getBean(ServiceController.class);
//		bean1.say();
//		UserComponent bean2 = context.getBean(UserComponent.class);
//		UserRepository bean3 = context.getBean(UserRepository.class);
//		bean2.say();
//		bean3.say();
//		UserInfo bean = context.getBean(UserInfo.class);
//		System.out.println(bean);
//		Object bean=context.getBean("zhangsan");
//		System.out.println(bean);
//		PropertiseController bean = context.getBean(PropertiseController.class);
//		bean.readValue();


	}

}
